package com.atguigu.lease.web.app.service.impl;

import com.atguigu.lease.model.entity.GraphInfo;
import com.atguigu.lease.web.app.mapper.GraphInfoMapper;
import com.atguigu.lease.web.app.service.GraphInfoService;
import com.atguigu.lease.web.app.vo.graph.GraphVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author liubo
 * @description 针对表【graph_info(图片信息表)】的数据库操作Service实现
 * @createDate 2023-07-26 11:12:39
 */
@Service
public class GraphInfoServiceImpl extends ServiceImpl<GraphInfoMapper, GraphInfo>
        implements GraphInfoService {

    /**
     * 根据公寓id获取公寓图片信息
     *
     * @param id 公寓id
     * @return 公寓图片列表
     */
    @Override
    public List<GraphInfo> getGraphListByApartmentId(Long id) {
        return baseMapper.selectGraphListByApartmentId(id);
    }

    /**
     * 获取房间的图片列表
     *
     * @param id 房间id
     * @return 房间的图片列表
     */
    @Override
    public List<GraphVo> getGraphVoListByRoomId(Long id) {
        return baseMapper.selectGraphVoListByRoomId(id);
    }
}




